package com.gs.cd.service.auth.model;

import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import com.diboot.core.binding.annotation.BindEntity;
import com.gs.cd.service.role.model.AuthRole;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 *
 * </p>
 *
 * @author seven
 * @since 2020-12-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class AuthUserRole implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 用户登录名
     */
    private String userLoginName;

    /**
     * 角色code
     */
    private String roleCode;

    /**
     * 租户编码
     * 默认"default"租户下
     */
    private String tenantCode = "default";

    @TableField(exist = false)
    @BindEntity(entity = AuthRole.class, condition = "this.roleCode=roleCode")
    private AuthRole authRole;



}
